#include<iostream>
using namespace std;
//时间计算
class Time {
private:
    int hours;
    int minutes;
public:
    Time() {}
    Time(int hours, int minutes) {
        this->hours = hours;
        this->minutes = minutes;
    }

    void setHours(int hours) {
        this->hours = hours;
    }

    int getHours() {
        return this->hours;
    }

    void setMinutes(int minutes) {
        this->minutes = minutes;
    }

    int getMinutes() {
        return this->minutes;
    }

    Time operator+(const Time& t) const {
        Time sum;
        sum.minutes = t.minutes + this->minutes;
        sum.hours = t.hours + this->hours + sum.minutes / 60;
        sum.minutes = sum.minutes % 60;
        return sum;
    }

    Time operator*(double mult) const {
        Time result;
        long totalMinutes = hours * mult * 60 + minutes * mult;
        result.hours = totalMinutes / 60;
        result.minutes = totalMinutes % 60;
        return result;
    }
};